pnpm: add detailed completion support#3318
Open
drmikecrowe wants to merge 1 commit intocarapace-sh:masterfrom
Open
pnpm: add detailed completion support#3318drmikecrowe wants to merge 1 commit intocarapace-sh:masterfrom
drmikecrowe wants to merge 1 commit intocarapace-sh:masterfrom
Conversation
- Add 8 new action files (config, module, owner, package, script, store, workspace, workspace_specific) mirroring the npm actions structure - Add missing completers: cat-file, cat-index, find-hash, help, init - Expand exec, start with full flag definitions and completions - Add script completion for run positional args (ActionScripts) - Wire workspace actions: ActionWorkspaceScripts across workspace packages, ActionWorkspaceFilter patterns into ActionFilter, ActionWorkspaceDependencies into rebuild/remove/update positionals and --workspace flag - Rename root_rootCmd to rootRootCmd (Go naming convention) - Add addWorkspaceFlags helper for --workspace/-w completion - Add local dev artifacts to .gitignore Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands pnpm completion with full flag support, script/workspace awareness, and new action helpers mirroring the npm actions structure.
NOTE: I am not a Go programmer. However, I also didn't simply give this to claude to solve. I've tested, screenshot, corrected and looked closely at what it produced. I'm happy to do more if you need.
New action files (
pkg/actions/tools/pnpm/):script.go—ActionScripts()completes scripts frompackage.jsonworkspace.go—ActionWorkspaces()readspnpm-workspace.yamlorpackage.jsonworkspace_specific.go—ActionWorkspaceScripts()(reads scripts across all workspace packages),ActionWorkspaceFilter()(common filter patterns),ActionWorkspaceDependencies()config.go—ActionLocalConfigKeys()/ActionGlobalConfigKeys()module.go—ActionModules()completes fromnode_modulesowner.go—ActionOwners(pkg)package.go—ActionPackageSearch(),ActionPackageVersions(),ActionPackageTags()store.go—ActionStorePackages(),ActionStoreAdd()New completers (
completers/common/pnpm_completer/cmd/):cat-file,cat-index,find-hash,help,initImprovements to existing completers:
exec,start— full flag definitions + completions (previously stubs)run— positional script completion viaActionScripts()+ActionWorkspaceScripts()rebuild,remove,update— workspace-aware dependency completionroot— global flags (--filter,--loglevel, etc.) with completions;addWorkspaceFlags()helper for--workspace/-wroot_root— renameroot_rootCmd→rootRootCmd(Go naming convention)ActionFilter()— batches workspace filter patterns alongside package namesTest plan
pnpm run <TAB>completes scripts frompackage.jsonpnpm run --filter <TAB>completes package names + patterns like...,packages/*pnpm exec --dir <TAB>completes directoriespnpm remove <TAB>completes installed dependencies including workspace packagespnpm update <TAB>completes dependency namespnpm start,pnpm execflag completions work🤖 Generated in conjunction with Claude Code